package DirectsDB;

import DataBase.MenuTag_File;
import junit.framework.TestCase;

/**
* Description :Test the MenuDirects
* <p>
*
*@author Danielle
*/
public class MenuDirectsTest extends TestCase {
	
	private MenuDirects menuDir;
	/**
	* Description init all :menuDir
	*/
	public void initAll()
	{
		menuDir=new MenuDirects();
		menuDir.delAll();
	}
	/**
	* Description show to screen
	* @param String[] str
	*/
	public void show(String[] str)
	{
		int i,size=str.length;
		for (i=0; i<size; i++)
		{
			System.out.println(str[i]);
		}
	}
	/**
	* Description Test 1: addDir, retAllDir
	* @throws Exception
	*/
	public void testSource1() throws Exception  {
	
		initAll();
		menuDir.addDir("c:\\newDir");
		show(menuDir.retAllDir());
		//while(true);
		initAll();
	}
	/**
	* Description Test 2:addDir, retAllDir, delDir
	* @throws Exception
	*/
	public void testSource2() throws Exception  {
		initAll();
		menuDir.addDir("newDir");
		show(menuDir.retAllDir());
		menuDir.delDir("newDir");
		System.out.println("After: ");
		show(menuDir.retAllDir());
		//while(true);
		initAll();
	}
	
	
}
